﻿namespace Core
{
    public abstract partial class AbstractGameplay<T_B, T_N> : Entity, IAwake
        where T_B : AbstractBoard<T_N>, new()
        where T_N : AbstractNode, new()
    {
        public T_B B { get; private set; }

        public virtual void Awake()
        {
            B = G.Factory.CreateWithParent<T_B>(this);
        }

        public override void Dispose()
        {
            if (IsDisposed) return;
            base.Dispose();

            B.Dispose();
            B = null;
        }

        public virtual void Pause()
        {

        }

        public virtual void Resume()
        {

        }

        public virtual void Refresh()
        {

        }


    }
}
